package com.dmgis.hndz.sddz.controller;

import com.dmgis.hndz.common.result.HttpStatusEnum;
import com.dmgis.hndz.common.result.ResponseResult;
import com.dmgis.hndz.sddz.service.Zdda01aService;
import com.dmgis.hndz.sddz.vo.XzqhVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @author: xwx
 * @description: 用来做山东地灾的接口实现
 * @date: 2024/7/3
 * @version: 1.0
 */
@RestController
@RequestMapping("sddz")
public class XzqhController {
    //注入操作行政区划的service
    @Autowired
    private Zdda01aService service;
    @GetMapping("/xzqh")
    public ResponseResult<Map<String, List<XzqhVO>>> getXzqh(@RequestParam String type) {
        //获取行政区划的编码和名称，需要返回省市县三级
        service.queryXzqh(type);
        return ResponseResult.success(HttpStatusEnum.SUCCESS.getCode(), "获取行政区划成功", null);
    }
}
